package com.example.informationEntry.dao;

import com.example.informationEntry.entity.NaEmergencyContactRelationship;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 紧急联系人关系(NaEmergencyContactRelationship)表数据库访问层
 *
 * @author makejava
 * @since 2019-04-08 08:59:18
 */
@Mapper
public interface NaEmergencyContactRelationshipDao {

    /**
     * 通过ID查询单条数据
     *
     * @param emergencyContactRelationshipId 主键
     * @return 实例对象
     */
    NaEmergencyContactRelationship queryById(String emergencyContactRelationshipId);

    /**
     * 查询指定行数据
     *
     * @param emergencyContactRelationship 联系人关系
     * @return 对象列表
     */
    List<NaEmergencyContactRelationship> queryAllByName(String emergencyContactRelationship);


    /**
     * 通过实体作为筛选条件查询
     *
     * @param naEmergencyContactRelationship 实例对象
     * @return 对象列表
     */
    List<NaEmergencyContactRelationship> queryAll(NaEmergencyContactRelationship naEmergencyContactRelationship);

    /**
     * 新增数据
     *
     * @param naEmergencyContactRelationship 实例对象
     * @return 影响行数
     */
    int insert(NaEmergencyContactRelationship naEmergencyContactRelationship);

    /**
     * 修改数据
     *
     * @param naEmergencyContactRelationship 实例对象
     * @return 影响行数
     */
    int update(NaEmergencyContactRelationship naEmergencyContactRelationship);

    /**
     * 通过主键删除数据
     *
     * @param emergencyContactRelationshipId 主键
     * @return 影响行数
     */
    int deleteById(String emergencyContactRelationshipId);

}